import Vue from 'vue'
import store from './store'
import router from './router'
import App from './App.vue'
//import axios from 'axios'
import '../src/components/wechatauth/interceptor'
//Vue.prototype.axios = axios
// import utils from './utils/util'
// Vue.use(utils)

Vue.config.productionTip = false

// router.beforeEach((to, from, next) => {
//   /* 路由发生变化修改页面title */
//   if (to.meta.title) {
//     document.title = to.meta.title
//   }
//   next()
// })

Vue.directive('scroll', {
  inserted: function (el, binding) {
    let f = function (evt) {
      if (binding.value(evt, el)) {
        el.removeEventListener('scroll', f)
      }
    }
    el.addEventListener('scroll', f)
  }
})

new Vue({
  el:'#app',
  router,
  store,
  render: h => h(App),
})

